home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1993…ch: Other People's Memory / ADC Developer CD (1993-03) (''Other People's Memory'')_iso / Dev.CD Mar 93.iso / Development Platforms / CSMP Digests / csmp-v1-005.txt < prev    next >
Encoding:
Text File  |  1992-11-18  |  53.0 KB  |  1,691 lines  |  [TEXT/MPS ]

  1. C.S.M.P. Digest             Sun, 08 Mar 92       Volume 1 : Issue 5
  2.  
  3. Today's Topics:
  4.  
  5.     Orphan virus?
  6.     68040 Caches...Flush Opcode?
  7.     What is the latest version of Sourcebug?
  8.     Changes for C 5.0 for Mac. Prog. Primer
  9.     Think C 5.0 Changes for Vol II Mac C Primer
  10.     Multi-thread packages
  11.     MacApp: IsObject isn't safe!
  12.     Disabling all interrupts via MacOS-routine ?
  13.     !Weird Behavior in Finder's "Get Info" Windows
  14.     SPHIGS for Mac
  15.     Format of icm#, icm4, icm8 icon resources
  16.     CacheOut
  17.     Old (strange) finder icon masks
  18.  
  19.  
  20. The Comp.Sys.Mac.Programmer Digest is moderated by Michael A. Kelly.
  21.  
  22. These digests are available (by using FTP, account anonymous, your email
  23. address as password) in the pub/mac directory on ftp.cs.uoregon.edu.
  24. This is also the home of the comp.sys.mac.programmer Frequently Asked
  25. Questions list.
  26.  
  27. The articles in these digests are taken directly from comp.sys.mac.programmer.
  28. They are not edited; all articles included in this digest are in their original
  29. posted form.  The only articles that are -not- included in these digests are
  30. those which didn't receive any replies (except those that give information
  31. rather than ask a question).  All replies to each article are concatenated
  32. onto the original article in the order in which they were received.  Article
  33. threads are not added to the digests until the last article added to the
  34. thread is at least one month old (this is to ensure that the thread is dead
  35. before adding it to the digests).
  36.  
  37. Send administrative mail to mkelly@cs.uoregon.edu.
  38.  
  39. -------------------------------------------------------
  40.  
  41. From: agoodale@eniac.seas.upenn.edu (Andrew H Goodale)
  42. Subject: Orphan virus?
  43. Date: 28 Jan 92 16:34:01 GMT
  44. Organization: University of Pennsylvania
  45.  
  46.  
  47.     My friend thinks he has discovered a new virus (unfortunately).  He downloads many things from local BBS's.  One day when running Norton's speed disk he found that some of his empty space had now become part of an "unknown" type of file.  Under Speed Disk's color coding, the areas were black and highly fragmented.  With the magnifying glass, he looked on the black parts and the text "Orphan ??" appeared.
  48.     Has anyone heard of this?  It appears to effect only free space, and not files because neither SAM nor Disinfectant 2.5.1 found any viruses.  Any help
  49. would be greatly appreciated.
  50.  
  51.                         - Andrew G.
  52.  
  53. agoodale@eniac.seas.upenn.edu
  54.  
  55.  
  56.  
  57. - -------------------------
  58.  
  59. From: rsfinn@joplin.lcs.mit.edu (Russell S. Finn)
  60. Subject:  Orphan virus?
  61. Date: 29 Jan 92 23:24:14 GMT
  62. Organization: MIT Laboratory for Computer Science
  63.  
  64. In article <63953@netnews.upenn.edu>, agoodale@eniac.seas.upenn.edu (Andrew H Goodale) writes:
  65. |>     My friend thinks he has discovered a new virus
  66. |> (unfortunately).  He downloads many things from local BBS's.  One
  67. |> day when running Norton's speed disk he found that some of his
  68. |> empty space had now become part of an "unknown" type of file.
  69. |> Under Speed Disk's color coding, the areas were black and highly
  70. |> fragmented.  With the magnifying glass, he looked on the black
  71. |> parts and the text "Orphan ??" appeared.      Has anyone heard of
  72. |> this?  It appears to effect only free space, and not files because
  73. |> neither SAM nor Disinfectant 2.5.1 found any viruses.
  74.  
  75. Please don't take this personally, Andrew, but:
  76.  
  77. I WISH PEOPLE WOULD STOP ASSUMING THAT EVERY LITTLE ODD THING ON THEIR
  78. MACINTOSH IS CAUSED BY A VIRUS!
  79.  
  80. There haven't been any new strains of viruses on the Macintosh in
  81. quite some time; furthermore, the people who have taken on the
  82. responsibility of looking out for such things (like Chris Johnson and
  83. John Norstad; thanks, guys) do such a good job that any future viral
  84. outbreaks are likely to be well contained.
  85.  
  86. Now admittedly it's smart to be on the safe side, particularly if one
  87. is doing a lot of downloading; but on the other hand, if neither SAM
  88. nor Disinfectant reported anything, why assume it's a virus?
  89.  
  90. Particularly when there's a simpler explanation:  it sounds like the
  91. catalog on your hard disk has been corrupted in such a way that some
  92. blocks are marked as allocated, even though they're not part of any
  93. file.  Such blocks are commonly called "orphaned" blocks.  I'd be very
  94. surprised if the Norton manual didn't explain this somewhere (you *do*
  95. have the manual, right?).  
  96.  
  97. This is exactly the type of problem that Disk First Aid was designed
  98. to fix; probably some portion of the Norton Utilities will fix it, too
  99. (I don't use it myself).
  100.  
  101. I apologize if I come across too strongly, but this one was the
  102. proverbial last straw.  (Would whoever's working on the FAQ list
  103. include a section on this, please?)
  104.  
  105. -- Russell S. Finn
  106. rsfinn@lcs.mit.edu
  107.  
  108.  
  109.  
  110. - -------------------------
  111.  
  112. From: agoodale@eniac.seas.upenn.edu (Andrew H Goodale)
  113. Subject:  Orphan virus?
  114. Date: 30 Jan 92 00:48:00 GMT
  115. Organization: University of Pennsylvania
  116.  
  117. All right, I should have known better.  If this ever happens again, I'm 
  118. going to respect the opinions of SAM and Disinfectant.  That was my bad. Also,
  119. I *don't* have the manual to Norton Utilities because I don't own it.  This was my friends IIcx; he owns Norton Utilities and didn't bother to read his manual  Sorry to have inconveienced anyone.  In the future, I won't jmp to
  120. conclusions. :)
  121.                         - Andrew G.
  122.  
  123. agoodale@eniac.seas.upenn.edu
  124. Sig, sig.  Where's my sig?  
  125.  
  126.  
  127.  
  128. ---------------------------
  129.  
  130. From: reed@excalibur.TC.Cornell.EDU (Michael Reed)
  131. Subject: 68040 Caches...Flush Opcode?
  132. Organization: Cornell Theory Center
  133. Date: Tue, 28 Jan 1992 18:04:54 GMT
  134.  
  135. Add yet another question to the 68040 list...Is there an opcode to force a flushing of the caches?  It could be handy (to say the least) in these situations.  Then if you had to (for some unknown reason :->) to write self-modifying code, at least you could ensure that it will work properly.  
  136.  
  137. -Michael G. Reed
  138.  
  139.  
  140.  
  141. - -------------------------
  142.  
  143. From: davet@cmi.com (David Temkin)
  144. Subject:  68040 Caches...Flush Opcode?
  145. Date: 28 Jan 92 21:48:15 GMT
  146. Organization: EDS Corp.
  147.  
  148.  
  149. In article <1992Jan28.180454.19184@tc.cornell.edu>, reed@excalibur.TC.Cornell.EDU (Michael Reed) writes:
  150. > Add yet another question to the 68040 list...Is there an opcode to force a flushing of the caches?  It could be handy (to say the least) in these situations.  Then if you had to (for some unknown reason :->) to write self-modifying code, at least you could ensure that it will work properly.  
  151. > -Michael G. Reed
  152. >
  153.  
  154. There may be an opcode to do this, but the Apple-certified
  155. method involves the use of a trap. To flush both the data
  156. cache and the instruction cache, I've tried this code:
  157.  
  158.     if (TrapAvailable(_HWPriv)) {
  159.         FlushDataCache();
  160.         FlushInstructionCache();
  161.         }
  162.  
  163. TrapAvailable() is my own. The other stuff is OS stuff, and
  164. is available on 68030 and 040 machines. I believe that this is how the
  165. tech note says to do this.
  166.  
  167. BUT THERE'S A PROBLEM. Perhaps I'm overlooking something and someone
  168. can clear up the difficulty. I run the above code immediately after swapping
  169. a set of jump table entries with another set of jump table entries. 
  170. This has the effect of causing subsequent calls to the first set of 
  171. functions to call functions from the second set, and it works quite reliably
  172. on every 68020- and 68030-based Mac I've tried it on.
  173.  
  174. But it turns  out, if you think about it, that modifying jump table entries
  175. constitutes self-modifying code, so I inserted the above code to fix
  176. potential problems arising from the instruction cache.
  177.  
  178. Still, the problem remains. I don't have access to a Quadra, but friends who
  179. do tell me that the program crashes unpredictably on that machine if the
  180. configuration is such that the jump table entries need to be swapped (that
  181. is, if the machine is running in color). 
  182.  
  183. Is there something wrong with the above code, or is the more general
  184. strategy somehow flawed? 
  185.  
  186. Thanks,
  187.  
  188. David Temkin
  189. davet@cmi.com
  190.  
  191.  
  192.  
  193. - -------------------------
  194.  
  195. From: neeri@iis.ethz.ch (Matthias Ulrich Neeracher)
  196. Subject:  68040 Caches...Flush Opcode?
  197. Date: 29 Jan 92 14:27:53 GMT
  198. Organization: Integrated Systems Laboratory, ETH, Zurich
  199.  
  200. In article <15245@etsu.CMI.COM> davet@cmi.com (David Temkin) writes:
  201. >There may be an opcode to do this, but the Apple-certified
  202. >method involves the use of a trap. To flush both the data
  203. >cache and the instruction cache, I've tried this code:
  204. >
  205. >    if (TrapAvailable(_HWPriv)) {
  206. >        FlushDataCache();
  207. >        FlushInstructionCache();
  208. >        }
  209. >
  210. >TrapAvailable() is my own. The other stuff is OS stuff, and
  211. >is available on 68030 and 040 machines. I believe that this is how the
  212. >tech note says to do this.
  213. >
  214. >BUT THERE'S A PROBLEM. Perhaps I'm overlooking something and someone
  215. >can clear up the difficulty. I run the above code immediately after swapping
  216. >a set of jump table entries with another set of jump table entries. 
  217. >This has the effect of causing subsequent calls to the first set of 
  218. >functions to call functions from the second set, and it works quite reliably
  219. >on every 68020- and 68030-based Mac I've tried it on.
  220. >
  221. >But it turns  out, if you think about it, that modifying jump table entries
  222. >constitutes self-modifying code, so I inserted the above code to fix
  223. >potential problems arising from the instruction cache.
  224. >
  225. >Still, the problem remains. I don't have access to a Quadra, but friends who
  226. >do tell me that the program crashes unpredictably on that machine if the
  227. >configuration is such that the jump table entries need to be swapped (that
  228. >is, if the machine is running in color). 
  229. >
  230. >Is there something wrong with the above code, or is the more general
  231. >strategy somehow flawed? 
  232.  
  233. A problem might occur if you use the jump table between the swapping of the
  234. entries and the end of the flushing, for example if one of the three routines
  235. above needs glue code from another segment.
  236.  
  237. Try installing the new jump table entries with _BlockMove, which automagically
  238. flushes the caches, maybe this works.
  239.  
  240. Matthias
  241.  
  242. - ---
  243. Matthias Neeracher                                      neeri@iis.ethz.ch
  244.  `We say "gestalt" when things combine to act in ways we can't explain'
  245.                              -- Marvin Minsky, _The Society Of Mind_
  246.  
  247.  
  248.  
  249. ---------------------------
  250.  
  251. From: weiser@pogo.mmc.com (Matt Weiser)
  252. Subject: What is the latest version of Sourcebug?
  253. Date: 28 Jan 92 20:56:40 GMT
  254. Organization: Martin Marietta WIS
  255.  
  256. Title says it all.  Is SourceBug released yet? (I was given a beta
  257. version in a class.)
  258.  
  259. Thanks
  260. Matt
  261.  
  262.  
  263.  
  264. - -------------------------
  265.  
  266. From: mlanett@void.ncsa.uiuc.edu (Mark Lanett)
  267. Subject:  What is the latest version of Sourcebug?
  268. Date: 28 Jan 92 21:54:35 GMT
  269. Organization: University of Illinois at Urbana
  270.  
  271. weiser@pogo.mmc.com (Matt Weiser) writes:
  272.  
  273. >Title says it all.  Is SourceBug released yet? (I was given a beta
  274. >version in a class.)
  275.  
  276. >Thanks
  277. The version off of ETO 5 (6 is due Real Soon Now) has 1.0b4, which is 
  278. faster than 1.0b1 but doesn't have any more features.
  279. -- 
  280. Mark Lanett                                                   mlanett@uiuc.edu
  281. Software Tools Group, NCSA, University of Illinois at Urbana-Champaign
  282.  
  283.  
  284.  
  285. - -------------------------
  286.  
  287. From: bbs.metalmac@tsoft.sf-bay.org (Tom Santos)
  288. Subject:  What is the latest version of Sourcebug?
  289. Date: 29 Jan 92 09:14:37 GMT
  290. Organization: The TeleSoft BBS and Public Access Unix, +1 415 969 7958
  291.  
  292. mlanett@void.ncsa.uiuc.edu (Mark Lanett) writes:
  293.  
  294. > weiser@pogo.mmc.com (Matt Weiser) writes:
  295. > >Title says it all.  Is SourceBug released yet? (I was given a beta
  296. > >version in a class.)
  297. > >Thanks
  298. > The version off of ETO 5 (6 is due Real Soon Now) has 1.0b4, which is 
  299. > faster than 1.0b1 but doesn't have any more features.
  300. > -- 
  301. > Mark Lanett                                                   mlanett@uiuc.ed
  302. > Software Tools Group, NCSA, University of Illinois at Urbana-Champaign
  303. I have 1.0b4... you are right about it not having any more features.  In
  304. fact, they don't plan on displaying arrays anytime in the near future.  If
  305. you want it to display an object decently, you MUST make it a Pascal
  306. Object.
  307.  
  308. Beware of it going into MacsBug and saying "fPatch != 0"...  It says that
  309. every once-in-a-while and that ensures an up-coming bomb...
  310.  
  311. Tom
  312.  
  313.  
  314. --
  315. Tom Santos (bbs.metalmac@tsoft.sf-bay.org)
  316.  
  317.  
  318.  
  319. ---------------------------
  320.  
  321. From: J.Cook@ENS.Prime.COM (Jim Cook)
  322. Subject: Changes for C 5.0 for Mac. Prog. Primer
  323. Date: 28 Jan 92 22:50:57 GMT
  324. Organization: Prime Computer, Inc.
  325.  
  326. At least one person has requested from me the changes to programs in
  327. Mark & Reed's Macintosh Programming Primer, Vol I, to allow the programs
  328. that were originally composed with Think C version 4.0 to run under
  329. Think C version 5.0.
  330.  
  331. The following list of changes were posted on America On-Line (AOL).
  332. If you have questions, write the author as I'm only the messanger.
  333.  
  334. Jim
  335. - ---------------------------------------------------------------------------
  336. Dear Mac C Primer (Volume I) reader:
  337.  
  338. With the introduction of a new version of THINK C (v5.0), you'll need to make a
  339. few changes in your  source code to maintain compatibility:
  340.  
  341. EventTutor:
  342. 1) (p. 115) Change #define of MOVE_TO_FRONT from
  343.             -1L
  344.     to
  345.             (WindowPtr)-1L
  346.  
  347. 2) (p. 118) Change 2 occurences of BeginUpdate( gTheEvent.message ) to
  348.             BeginUpdate( (WindowPtr)gTheEvent.message )
  349.  
  350. 3) (p. 118-119) Change 2 occurences of EndUpdate( gTheEvent.message ) to
  351.             EndUpdate( (WindowPtr)gTheEvent.message )
  352.  
  353. 4) (p. 119) Change DrawGrowIcon( gTheEvent.message ) to
  354.             DrawGrowIcon( (WindowPtr)gTheEvent.message )
  355.  
  356. 5) (p. 118) Change Call of DrawMyPicture( gTheEvent.message, gPictureHandle );
  357.             to DrawMyPicture( (WindowPtr)gTheEvent.message, gPictureHandle );
  358.  
  359.  
  360. Flying Line:
  361. 1) (p. 92) Change #define of MOVE_TO_FRONT from
  362.             -1L
  363.     to
  364.             (WindowPtr)-1L
  365.  
  366.  
  367. Hello2:
  368. 1) (p. 63) Change #define of MOVE_TO_FRONT from
  369.             -1L
  370.     to
  371.             (WindowPtr)-1L
  372.  
  373.  
  374. Mondrian:
  375. 1) (p. 74) Change #define of MOVE_TO_FRONT from
  376.             -1L
  377.     to
  378.             (WindowPtr)-1L
  379.  
  380.  
  381. Pager:
  382. 1) (p. 333) Change #define of MOVE_TO_FRONT from
  383.             -1L
  384.     to
  385.             (WindowPtr)-1L
  386.  
  387. 2) (p. 335) Change BeginUpdate( gTheEvent.message ) to
  388.             BeginUpdate( (WindowPtr)gTheEvent.message )
  389.  
  390. 3) (p. 335) Change DrawControls( gTheEvent.message ); to
  391.             DrawControls( (WindowPtr)gTheEvent.message );
  392.  
  393. 4) (p. 335) Change UpdateMyWindow( gTheEvent.message ); to
  394.             UpdateMyWindow( (WindowPtr)gTheEvent.message );
  395.  
  396. 5) (p. 335) Change EndUpdate( gTheEvent.message ) to
  397.             EndUpdate( (WindowPtr)gTheEvent.message )
  398.  
  399.  
  400. PrintPICT:
  401. 1) (p. 316) Change #include from "PrintMgr.h" to "PrintTraps.h"
  402.  
  403.  
  404. Reminder:
  405. 1) (p. 229) Change #define of MOVE_TO_FRONT from
  406.             -1L
  407.     to
  408.             (WindowPtr)-1L
  409.  
  410. 2) (p. 240) Change 2 occurances of nmSIcon to nmIcon
  411.  
  412. 3) (p. 229) Add the lines:
  413.                      #include <Packages.h>
  414.                      #include <Dialogs.h>
  415.             to the very beginning of the program.
  416.  
  417.  
  418.  
  419. ShowClip:
  420. 1) (p. 300) Change #define of MOVE_TO_FRONT from
  421.             -1L
  422.     to
  423.             (WindowPtr)-1L
  424.  
  425. 2) (p. 302) Change call of CenterPict( clipHandle, &myRect );
  426.     to CenterPict( (PicHandle)clipHandle, &myRect );
  427.  
  428.  
  429. ShowPICT:
  430. 1) (p. 86) Change #define of MOVE_TO_FRONT from
  431.             -1L
  432.     to
  433.             (WindowPtr)-1L
  434.  
  435.  
  436. Sounder:
  437. 1) (p. 350) Add this line before the first #define:
  438.  
  439. #include <Sound.h>
  440.  
  441. 2)  Optional:  Use the functions CountResources() and GetIndResource() to play
  442. all available 'snd ' resources.  CountResources( 'snd ' ) will return the
  443. number
  444. of 'snd 's available in all open resource forks.  Use this value to create a
  445. loop around calls to GetIndResource( 'snd ', i ) and SndPlay().
  446.  
  447.  
  448. Timer:
  449. 1) (p. 163) Add this line before the first #define:
  450.         #include "Packages.h"
  451.         
  452. 2) (p. 163) Change #define of MOVE_TO_FRONT from
  453.             -1
  454.     to
  455.             (WindowPtr)-1L
  456.  
  457. 3) (p. 166) Change BeginUpdate( gTheEvent.message ) to
  458.             BeginUpdate( (WindowPtr)gTheEvent.message )
  459.  
  460. 4) (p. 166) Change EndUpdate( gTheEvent.message ) to
  461.             EndUpdate( (WindowPtr)gTheEvent.message )
  462.  
  463.  
  464. WindowMaker:
  465. 1) (p. 274) Change #define of MOVE_TO_FRONT from
  466.             -1
  467.     to
  468.             (WindowPtr)-1
  469.  
  470. 2) (p. 277) Change if (!IsDAWindow( gTheEvent.message ) ) to
  471.             if (!IsDAWindow( (WindowPtr)gTheEvent.message ) )
  472.     
  473. 3) (p. 277) Change SetPort( gTheEvent.message );
  474.     to SetPort( (WindowPtr)gTheEvent.message );
  475.  
  476. 4) (p. 277) Change BeginUpdate( gTheEvent.message ) to
  477.             BeginUpdate( (WindowPtr)gTheEvent.message )
  478.  
  479. 5) (p. 277) Change EndUpdate( gTheEvent.message ) to
  480.             EndUpdate( (WindowPtr)gTheEvent.message )
  481.  
  482. 6) Change DrawMyPicture( gMyPicture, gTheEvent.message );
  483.     to DrawMyPicture( gMyPicture, (WindowPtr)gTheEvent.message );
  484.     
  485.  
  486. Zinger:
  487. 1) (p. 183) Change #define of MOVE_TO_FRONT from
  488.             -1L
  489.     to
  490.             (WindowPtr)-1L
  491.  
  492. 2) (p. 186) Change BeginUpdate( gTheEvent.message ) to
  493.             BeginUpdate( (WindowPtr)gTheEvent.message )
  494.  
  495. 3) (p. 186) Change EndUpdate( gTheEvent.message ) to
  496.             EndUpdate( (WindowPtr)gTheEvent.message )
  497.  
  498.  
  499.  
  500.  
  501. - -------------------------
  502.  
  503. From: jordi@sc2a.unige.ch
  504. Subject:  Changes for C 5.0 for Mac. Prog. Primer
  505. Date: 30 Jan 92 10:58:46 GMT
  506. Organization: University of Geneva, Switzerland
  507.  
  508. > At least one person has requested from me the changes to programs in
  509. > Mark & Reed's Macintosh Programming Primer, Vol I, to allow the programs
  510. > that were originally composed with Think C version 4.0 to run under
  511. > Think C version 5.0.
  512.  
  513.  
  514. Addison Wesley just released "Macintosh C Programming Primer Volume I,
  515. Second Edition". It is now compatible with last versions of Think C and
  516. with System 7!
  517.  
  518. Steve Jordi,
  519. Dpt Of Geophysics
  520. University of Geneva
  521. Switzerland
  522. jordi@sc2a.unige.ch
  523.  
  524.  
  525.  
  526. ---------------------------
  527.  
  528. From: J.Cook@ENS.Prime.COM (Jim Cook)
  529. Subject: Think C 5.0 Changes for Vol II Mac C Primer
  530. Date: 28 Jan 92 23:13:45 GMT
  531. Organization: Prime Computer, Inc.
  532.  
  533. Because someone asked, I'm also published the changes for Vol II of the
  534. Macintosh Programming Primer.  The primer was published based on Think 4.0.
  535. The following will allow you to run the programs under Think 5.0.
  536. Send any questions to the book's author - I'm just the messanger!
  537.  
  538. Jim
  539. <J.Cook@ENS.Prime.COM>
  540.  
  541. - -------------------------------------------------------------------------
  542.  
  543. Dear Mac C Primer (Volume II) reader,
  544.  
  545. With the introduction of a new version of THINK C (v5.0), you'll need to make
  546. some changes in your  source code to maintain compatibility:
  547.  
  548. cdev.c:
  549. 1) (p. 67) Insert line, just after the last #define:
  550.         short    FindFontNumber();
  551.  
  552. Tester.c:
  553. 1) (p. 95) Replace #define MOVE_TO_FRONT from
  554.         -1L
  555.     to
  556.         (WindowPtr)-1L
  557.  
  558. 2) (p. 97) Change BeginUpdate( gTheEvent.message ) to
  559.             BeginUpdate( (WindowPtr)gTheEvent.message )
  560.  
  561. 3) (p. 97) Change EndUpdate( gTheEvent.message ) to
  562.             EndUpdate( (WindowPtr)gTheEvent.message )
  563.  
  564. DLOG.c:
  565. 1) (p. 111) Replace #define MOVE_TO_FRONT from
  566.         -1L
  567.     to
  568.         (WindowPtr)-1L
  569.  
  570. ColorInfo.c:
  571. 1) (p. 136) Replace the line:
  572.         #include "ColorToolbox.h"
  573.     with
  574.         #include "Picker.h"
  575.  
  576. Palette.c:
  577. 1) (p. 153) Replace the line:
  578.         #include "ColorToolbox.h"
  579.     with the two lines:
  580.         #include "Palettes.h"
  581.         #include "Picker.h"
  582.         
  583. 2) (p. 153) Replace #define MOVE_TO_FRONT from
  584.         -1L
  585.     to
  586.         (WindowPtr)-1L
  587.  
  588. ColorTutor.c:
  589. 1) (p. 171) Replace the line:
  590.         #include "ColorToolbox.h"
  591.     with the two lines:
  592.         #include "Palettes.h"
  593.         #include "Picker.h"
  594.         
  595. 2) (p. 171) Replace #define MOVE_TO_FRONT from
  596.         -1L
  597.     to
  598.         (WindowPtr)-1L
  599.  
  600. GWorld.c:
  601. 1) (p. 203) Replace the two lines:
  602.         #include "ColorToolbox.h"
  603.         #include "QuickDraw32Bit.h"
  604.     with the two lines:
  605.         #include "Picker.h"
  606.         #include "QDOffscreen.h"
  607.         
  608. 2) (p. 203) Replace #define MOVE_TO_FRONT from
  609.         -1L
  610.     to
  611.         (WindowPtr)-1L
  612.         
  613. FormEdit.c:
  614. 1) (p. 244) Replace #define MOVE_TO_FRONT from
  615.         -1L
  616.     to
  617.         (WindowPtr)-1L
  618.         
  619. 2) (p. 251) In the function DoTEKey(), replace the line:
  620.         tempStr[ i+1 ] = (*text)[ i ];
  621.     with the line:
  622.         tempStr[ i+1 ] = (*(char **)text)[ i ];
  623.         
  624. 3) (p. 257) In the function HandleEditChoice(), replace the line:
  625.         tempStr[ i+1 ] = (*text)[ i ];
  626.     with the line:
  627.         tempStr[ i+1 ] = (*(char **)text)[ i ];
  628.         
  629. 4) (p. 266) In the function NewClikLoop(), replace the declaration:
  630.         int            amount;
  631.     with the line:
  632.         short            amount;
  633.  
  634. Starter. :
  635. 1) Make a copy of the "Starter Folder" found in the "TCL 1.1 Demos" folder in
  636. your "Development" folder.  Next, copy the following files from your old
  637. "MyStarter" folder into this new folder:
  638.         - CDragPane.c
  639.         - CDragPane.h
  640.         - CMouse.c
  641.         - CMouse.h
  642.         - CStarterDoc.c
  643.         - CStarterDoc.h
  644.         - CStarterPane.c
  645.         - CStarterPane.h
  646.         - Starter.c
  647.     You should be copying 9 files, replacing their counterparts in the new
  648.     folder.  Do NOT copy the files CStarterApp.c and CStarterApp.h!!!!!
  649.     Start up THINK C by double-clicking the file Starter.  in this new folder.
  650.  
  651. 2) Select Add... from the Source menu and add the files CDragPane.c and
  652. CMouse.c
  653. to the project.  Make sure you add the two files to the first segment in the
  654. project window.  To select the first segment, click on the file name
  655. CStarterApp.c (in the project window) before you select Add...
  656.     
  657. 3) Select Options... from the Edit menu.  
  658.     - Select "Language Settings" from the popup menu.
  659.     - Make sure that the "Language Extensions" check box is checked.
  660.     - Select the "THINK C + Objects" radio button.
  661.     - Make sure the "Strict Prototype Enforcement" check box is checked.
  662.     - Select the "Infer Prototypes" radio button.
  663.  
  664. 4) Edit each of the functions in the files CDragPane.c, CMouse.c, and
  665. CStarterPane.c.  Change each function's parameter declarations from the old
  666. style to the new style of parameter declaration.  Make sure you edit every
  667. single function!!!  Old style declarations look like this:
  668.         void CDragPane::DoClick( hitPt, modifierKeys, when )
  669.         Point        hitPt;
  670.         short        modifierKeys;
  671.         long        when;
  672.         {
  673.         }
  674.     New style declarations look like this:
  675.         void CDragPane::DoClick( Point hitPt, short modifierKeys, long when )
  676.         {
  677.         }
  678.  
  679. 5) (p. 348) In the file CDragPane.c, in the function IDragPane, change the
  680.    declaration:
  681.         Rect r;
  682.     to
  683.         LongRect r;
  684.         
  685. 6) (p. 349-350) Also in CDragPane.c, in the function DoClick, change the first
  686. five lines from:
  687.         Rect    r;
  688.         Rect    endLocation;
  689.         
  690.         r = frame;
  691.         EraseRect( &r );
  692.         
  693.         FrameToEnclR(&r);
  694.     to these eight lines:
  695.         Rect    r;
  696.         Rect    endLocation;
  697.         LongRect    longR;
  698.         
  699.         FrameToQDR( &frame, &r );
  700.         EraseRect( &r );
  701.         
  702.         QDToLongRect(&r,&longR);
  703.         FrameToEnclR(&longR);
  704.         LongToQDRect( &longR, &r );
  705.  
  706. 7) (p. 354) In the file CMouse.h, change the three lines:
  707.         void        BeginTracking( Point *startPt );
  708.         void        KeepTracking( Point *currPt, Point *prevPt, Point *startPt);
  709.         void        EndTracking( Point *currPt, Point *prevPt, Point *startPt);
  710.     to:
  711.         void        BeginTracking( struct LongPt *startPt );
  712.         void        KeepTracking( struct LongPt *currPt, struct LongPt *prevPt,
  713.                                     struct LongPt *startPt );
  714.         void        EndTracking( struct LongPt  *currPt, struct LongPt  *prevPt,
  715.                                     struct LongPt  *startPt );
  716.  
  717. 8) (p. 351) In the file CMouse.c, in the function IMouse(), change the
  718.    declaration:
  719.         Rect r;
  720.     to
  721.         LongRect r;
  722.  
  723. 9) (p. 351) Also in the file CMouse.c, in the function IMouse(), change:
  724.         theBounds = r;
  725.     to
  726.         LongToQDRect( &r, &theBounds );
  727.  
  728. 10) (p. 351) Also in the file CMouse.c, in the function BeginTracking(), change
  729.     the function declaration from:
  730.         void CMouse::BeginTracking( Point *startPt )
  731.     to
  732.         void CMouse::BeginTracking( struct LongPt *startPt )
  733.  
  734. 11) (p. 352-353) Also in the file CMouse.c, replace the function KeepTracking()
  735.     with the following:
  736.  
  737. void CMouse::KeepTracking( struct LongPt *currPt, struct LongPt *prevPt,
  738.                     struct LongPt *startPt )
  739. {
  740.     LongRect    r, f;
  741.     Rect        shortR;
  742.     long        curTicks;
  743.     LongPt        startPosit, newPosit, cp, pp;
  744.     RgnHandle    clipRgn;
  745.     
  746.     thePanorama->GetPosition( &startPosit );
  747.     
  748.     clipRgn = NewRgn();
  749.     
  750.     if ( thePanorama->AutoScroll( currPt )
  751.             || ! EqualLongPt( currPt, prevPt ) )
  752.     {
  753.         thePanorama->GetPosition( &newPosit );
  754.         
  755.         GetClip( clipRgn );
  756.         QDToLongRect( &((**clipRgn).rgnBBox), &r );
  757.         OffsetLongRect( &r, startPosit.h - newPosit.h,
  758.                 startPosit.v - newPosit.v );
  759.                 
  760.         thePanorama->GetFrame(&f);
  761.         PinInRect(&f, (LongPt *)(&(r.top)));
  762.         PinInRect(&f, (LongPt *)(&(r.bottom)));
  763.         
  764.         LongToQDRect( &r, &shortR );
  765.         ClipRect( &shortR );
  766.         
  767.         shortR = theLocation;    /* Erase old gray rect */
  768.         
  769.         curTicks = TickCount();
  770.         while ( curTicks == TickCount() ) ;
  771.         FrameRect( &shortR );
  772.         QDToLongRect( &shortR, &r );
  773.         
  774.         cp = *currPt;
  775.         pp = *prevPt;
  776.         QDToLongRect( &theBounds, &f );
  777.         PinInRect(&f, &cp);
  778.         PinInRect(&f, &pp);
  779.  
  780.         OffsetLongRect(&r, cp.h - pp.h, cp.v - pp.v);    
  781.             
  782.         SetClip( clipRgn );
  783.         
  784.         curTicks = TickCount();
  785.         while ( curTicks == TickCount() ) ;
  786.         
  787.         LongToQDRect( &r, &shortR );
  788.         FrameRect( &shortR );    /* Draw new gray rect */
  789.         theLocation = shortR;        /* update theLocation instance var */
  790.     }
  791.     DisposeRgn( clipRgn );
  792. }
  793.         
  794.         
  795. 12) (p. 353) Also in the file CMouse.c, Replace the declaration of the function
  796.     EndTracking() with:
  797.  
  798. void CMouse::EndTracking( struct LongPt  *currPt, struct LongPt  *prevPt,
  799.                     struct LongPt  *startPt )
  800.  
  801.  
  802. 13) Add these three lines to the list of include files in the file
  803.     CStarterDoc.c:
  804.         
  805. #include "TBUtilities.h"
  806. #include "CWindow.h"
  807. #include <Packages.h>
  808.  
  809. 14) In the file CStarterDoc.c, in the function OpenFile(), replace the line:
  810.         theError = theFile->Open(fsRdWrPerm);
  811.     with the line
  812.         theFile->Open(fsRdWrPerm);
  813.         
  814. 15) In the file CStarterDoc.c, in the function OpenFile(), comment
  815.     out each of the lines:
  816.         gApplication->RequestMemory(FALSE, TRUE);
  817.         theFile->ReadAll(&theData);
  818.     and
  819.         gApplication->RequestMemory(FALSE, FALSE);
  820.  
  821. 16) (p. 343) In the file CStarterDoc.c, in the function BuildWindow(), change
  822.     the line:
  823.         Rect            panFrame;
  824.     to
  825.         LongRect        panFrame;
  826.         
  827. 17) (p. 346) In the file CStarterPane.c, in the function DoDrag(), change the
  828.     declaration:
  829.         Rect        boundsRect;
  830.     to
  831.         LongRect        boundsRect;
  832.  
  833. 18) (p. 346) In the file CStarterPane.c, in the function DoDrag(), add the new
  834.     declaration:
  835.         LongPt        longP;
  836.         
  837. 19) (p. 346) In the file CStarterPane.c, in the function DoDrag(), change the
  838.     line:
  839.         TrackMouse( aMouseTask, p, &boundsRect );
  840.     to
  841.         QDToLongPt( p, &longP );
  842.         TrackMouse( aMouseTask, &longP, &boundsRect );
  843.  
  844. ShowINIT.c:
  845. 1) (p. 397) Delete the line:
  846.         #include <Color.h>
  847.  
  848.  
  849.  
  850.  
  851. - -------------------------
  852.  
  853. From: wwedel@uswest.com (Wally Wedel)
  854. Subject:  Think C 5.0 Changes for Vol II Mac C Primer
  855. Date: 29 Jan 92 18:52:44 GMT
  856. Organization: U S WEST Advanced Technologies
  857.  
  858. In article <1992Jan28.231345.25528@primerd.prime.com> J.Cook@ENS.Prime.COM 
  859. (Jim Cook) writes:
  860. > Because someone asked, I'm also published the changes for Vol II of the
  861. > Macintosh Programming Primer.  The primer was published based on Think 
  862. 4.0.
  863. > The following will allow you to run the programs under Think 5.0.
  864. > Send any questions to the book's author - I'm just the messanger!
  865.  
  866. But there's no address given for the authors!
  867.  
  868. In article <1992Jan28.231345.25528@primerd.prime.com> J.Cook@ENS.Prime.COM 
  869. (Jim Cook) writes:
  870. > FormEdit.c:
  871. > 1) (p. 244) Replace #define MOVE_TO_FRONT from
  872. >                 -1L
  873. >         to
  874. >                 (WindowPtr)-1L
  875. >                 
  876. > 2) (p. 251) In the function DoTEKey(), replace the line:
  877. >                 tempStr[ i+1 ] = (*text)[ i ];
  878. >         with the line:
  879. >                 tempStr[ i+1 ] = (*(char **)text)[ i ];
  880. >                 
  881. > 3) (p. 257) In the function HandleEditChoice(), replace the line:
  882. >                 tempStr[ i+1 ] = (*text)[ i ];
  883. >         with the line:
  884. >                 tempStr[ i+1 ] = (*(char **)text)[ i ];
  885.  
  886. 2) and 3) look broken to me! They're trying to assign a CharsHandle to an 
  887. Str255.
  888.                   tempStr[i+1] = (unsigned char)(*text)[i];
  889.  
  890. looks like a better bet! Their code compiles, but it doesn't appear to be right.
  891.  
  892.  
  893. Wally Wedel
  894. U S WEST Advanced Technologies
  895. 4001 Discovery Drive, Suite 390
  896. Boulder, CO 80303
  897. Internet: wwedel@uswest.com  AppleLink: D5100   Voice: 303-541-6052
  898.  
  899.  
  900.  
  901. ---------------------------
  902.  
  903. From: degennar@bmsr4.usc.edu (Raymond Degennaro)
  904. Subject: Multi-thread packages
  905. Date: 28 Jan 92 09:31:07 GMT
  906. Organization: University of Southern California, Los Angeles, CA
  907.  
  908. I was wondering, has anybody out there written or knows of, a multi-thread 
  909. package for the mac?  
  910.  
  911. Ray (DJ) DeGennaro 
  912. degennar@bmsrs.usc.edu
  913.  
  914.  
  915. -- 
  916.  
  917. Ray (DJ) DeGennaro II
  918. degennar@bmsrs.usc.edu
  919.  
  920.  
  921.  
  922. - -------------------------
  923.  
  924. From: plogan@mentorg.com (Patrick Logan)
  925. Subject:  Multi-thread packages
  926. Date: 31 Jan 92 16:09:47 GMT
  927. Organization: Mentor Graphics Corporation
  928.  
  929. In article <koc0urINN4uc@bmsr4.usc.edu> degennar@bmsr4.usc.edu (Raymond Degennaro) writes:
  930.    I was wondering, has anybody out there written or knows of, a multi-thread 
  931.    package for the mac?  
  932.  
  933. I don't know if you are restricting yourself to C/C++. There are two
  934. Scheme systems for the Mac that have multi-thread capabilities and
  935. both have a C/Pascal interface.
  936.  
  937. (1) MacScheme+Toolsmith, commercial, ~$400
  938.  
  939. (2) Gambit Scheme, shareware, ~$20-40
  940.  
  941. Lightship Software, makers of MS+T, recently moved their HQ to the Bay
  942. area. You can try to get a number for them there or here in Oregon. If
  943. you have trouble, get back to me and I can get their new number. [I
  944. have no connection other than being friends with one of the creators.]
  945.  
  946. Here's a note on getting Gambit...
  947.  
  948. ================ Copied Note ================
  949. You can get a copy of Gambit via anonymous ftp from
  950. trex.iro.umontreal.ca (address 132.204.36.34).  Source code is
  951. available as well as the binaries for a few machines:
  952.  
  953.    size    file
  954.   829429  pub/gambit1.7.1/gambit1.7.1.tar.Z        Source for system
  955.   925696  pub/gambit1.7.1/gsc1.7.1-gp1000          BBN GP1000 (compiler
  956.   409600  pub/gambit1.7.1/gsi1.7.1-gp1000                      interpreter)
  957.   878024  pub/gambit1.7.1/gsc1.7.1-hp7.0           HP9000/300, HPUX7.0
  958.   365031  pub/gambit1.7.1/gsi1.7.1-hp7.0
  959.   878063  pub/gambit1.7.1/gsc1.7.1-hp7.05          HP9000/300, HPUX7.05
  960.   365070  pub/gambit1.7.1/gsi1.7.1-hp7.05
  961.   919000  pub/gambit1.7.1/gsc1.7.1-next            NeXT
  962.   400315  pub/gambit1.7.1/gsi1.7.1-next
  963.   884736  pub/gambit1.7.1/gsc1.7.1-sun3            SUN3
  964.   376832  pub/gambit1.7.1/gsi1.7.1-sun3
  965.   200228  pub/gambit1.7.1/gambit1.7.1-mac.hqx      Macintosh version
  966.  
  967. Note: the Macintosh version only contains the interpreter.  The compiler,
  968. linker and source code for the Macintosh version is available seperately
  969. (check the "About..." dialog box in the interpreter).
  970.  
  971. Marc Feeley   -- feeley@iro.umontreal.ca
  972.  
  973. -- 
  974. Patrick Logan, plogan@mentorg.com,
  975. Voice: (503) 685-7000 x2907, FAX: (503) 685-1282
  976. Mentor Graphics Corp., Bldg. C, 8005 SW Boeckman Rd., Wilsonville, OR 97070
  977. I can't gete the .signature virus and I can't gete the .signature
  978.  
  979.  
  980.  
  981. - -------------------------
  982.  
  983. From: jyp@wucs1.wustl.edu (Jerome Yvon Plun)
  984. Subject:  Multi-thread packages
  985. Date: 4 Feb 92 14:14:29 GMT
  986. Organization: Washington University, St. Louis MO
  987.  
  988.  
  989.   There is also the thread package developed by Michael Gough and described
  990. in D E V E L O P.  
  991.   For more information, contact gough2@applelink.apple.com
  992.  
  993.   Jerome
  994.  
  995. Jerome Plun            []  Is it a crime to want something else?
  996. jyp@wucs1.wustl.edu    []  Is it a crime to believe in something different?
  997. Washington University  []  
  998. St Louis, MO           []  "Smalltown England", New Model Army, Vengeance
  999.  
  1000.  
  1001.  
  1002. ---------------------------
  1003.  
  1004. From: michael@otago.ac.nz
  1005. Subject: MacApp: IsObject isn't safe!
  1006. Date: 30 Jan 92 04:11:50 GMT
  1007. Organization: University of Otago, Dunedin, New Zealand
  1008.  
  1009. I think I have just discovered that the MacApp global IsObject function isn't
  1010. safe. I was using to test if a window I had added to the application free
  1011. window list was still around. This however causes occasional address error
  1012. crashes on 68000-based Macs as IsObject assumes it can go ahead and look for
  1013. class and method IDs once IsHandle returns OK. This turns out not to be true
  1014. sometimes in my case... A little more paranoia in IsObject would not go amiss -
  1015. have ther been any patches to it?
  1016.  
  1017.  
  1018. Michael(tm) Hamel, Computing Services Centre, University of Otago, New Zealand
  1019.  
  1020. BALDOCK (n.)                       
  1021. The sharp prong on the top of a tree stump where the tree has snapped off
  1022. before being completely sawn through.
  1023.  
  1024.  
  1025.  
  1026. - -------------------------
  1027.  
  1028. From: greggor@Apple.COM (Greg L. Anderson)
  1029. Subject:  MacApp: IsObject isn't safe!
  1030. Date: 30 Jan 92 18:13:16 GMT
  1031. Organization: Apple Computer Inc., Cupertino, CA
  1032.  
  1033. In article <1992Jan29.151150.2071@otago.ac.nz> michael@otago.ac.nz writes:
  1034. >I think I have just discovered that the MacApp global IsObject function isn't
  1035. >safe. I was using to test if a window I had added to the application free
  1036. >window list was still around.
  1037.  
  1038. IsObject was not intended to be used in that capacity.  The statement
  1039.  
  1040.     foo = (TFoo*)DisposeIfObject((Handle)foo);
  1041.  
  1042. is only safe if foo is either a valid object or 'nil'.
  1043.  
  1044. True, IsObject could do more tests & be more robust than it currently
  1045. is, but code in the form
  1046.  
  1047.     bar = foo;
  1048.         foo = (TFoo*)DisposeIfObject((Handle)foo);
  1049.     // more allocations and stuff
  1050.     bar = (TFoo*)DisposeIfObject((Handle)bar);
  1051.  
  1052. will never work, because it is always possible that the memory that
  1053. foo formerly pointed to might be reused by some other object that
  1054. would pass any test that IsObject might perform on it.
  1055.  
  1056. The solution to your problem is to make sure that you remove your
  1057. window from any list it happens to be on when you free it.
  1058.  
  1059. -- 
  1060. =====================   ===========================   =====================
  1061. Greg Anderson           Apple Computer, Inc.            O    Ponnuki    O
  1062. Macintosh Bodhisattva   Developer Tools Engineering    O O  is  ideal  O O
  1063. greggor@apple.com       Apple Developer Suite           O     shape     O
  1064. =====================   ===========================   =====================
  1065.  
  1066.  
  1067.  
  1068. ---------------------------
  1069.  
  1070. From: mziegler@Physik.TU-Muenchen.DE (Marcus Ziegler)
  1071. Subject: Disabling all interrupts via MacOS-routine ?
  1072. Date: 29 Jan 92 09:29:43 GMT
  1073. Organization: Technische Universitaet Muenchen, Germany
  1074.  
  1075.  
  1076. Does anyone know if there is a posibility to disable all Macintosh interrupts
  1077. (especially VBL) by using a Mac-OS routine and what are the problems that
  1078. might occur ?
  1079.  
  1080.  
  1081.  
  1082. - -------------------------
  1083.  
  1084. From: stevec@Apple.COM (Steve Christensen)
  1085. Subject:  Disabling all interrupts via MacOS-routine ?
  1086. Date: 1 Feb 92 01:46:49 GMT
  1087. Organization: Apple Computer Inc., Cupertino, CA
  1088.  
  1089. mziegler@Physik.TU-Muenchen.DE (Marcus Ziegler) writes:
  1090.  
  1091.  
  1092. >Does anyone know if there is a posibility to disable all Macintosh interrupts
  1093. >(especially VBL) by using a Mac-OS routine and what are the problems that
  1094. >might occur ?
  1095.  
  1096. Yes, you can disable all Macintosh interrupts at any time, but most everything
  1097. will stop working, specifically:
  1098.  
  1099.     keyboard and mouse
  1100.     time/date update
  1101.     VBLs, and so TickCount()
  1102.     slot interrupts (NuBus cards)
  1103.     floppy disk
  1104.     serial ports
  1105.     LocalTalk
  1106.     FileShare
  1107.  
  1108. I may have missed a few things, but at least these come to mind...
  1109.  
  1110. steve
  1111.  
  1112. -- 
  1113. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  1114.   Steve Christensen            Never hit a man with glasses.
  1115.   stevec@apple.com            Hit him with a baseball bat.
  1116.  
  1117.  
  1118.  
  1119. ---------------------------
  1120.  
  1121. From: dks@athena.mit.edu (Dhanesh K Samarasan)
  1122. Subject: !Weird Behavior in Finder's "Get Info" Windows
  1123. Date: 29 Jan 92 10:13:55 GMT
  1124. Organization: Massachusetts Institute of Technology
  1125.  
  1126.  
  1127.  
  1128.  
  1129. Fellow net-nuts: 
  1130.  
  1131. I just noticed something odd on two SCSI hard disks
  1132. connected to a Macintosh IIci running 7.0.1*. 
  1133.  
  1134. For each and every file and folder on both hard disks, the
  1135. filename that is shown to the right of the icon in the "Get
  1136. Info" window behaves like a little button. On mouseDown,
  1137. the name is highlighted. On mouseUp, the name is
  1138. de-highlighted and then modified as follows: 
  1139.  
  1140.         Original                Appears as
  1141.       ---------------------------------------
  1142.         Utilities               !Utiliti.es
  1143.         System Folder           !System.Fol
  1144.         ResEdit 2.1.1           !ResEdit.21
  1145.         HyperCard               !HyperCa.rd
  1146.         Text                    Text
  1147.           DD                    !DD
  1148.         EvenBetterBusError      !EvenBet.ter
  1149.         !Weird Problem          !!Weird.Pro
  1150.  
  1151. A second mouseClick on the name restores it to its rightful
  1152. value.
  1153.  
  1154. >From a cursory examination, I can't figure out the pattern
  1155. in the appearance of these pseudo-names. Clicking on any
  1156. other item in the "Get Info" window does not have the same
  1157. effect. DiskFirstAid, etc., do not find anything wrong with
  1158. the hard disks, and everything behaves normally in all
  1159. other respects. 
  1160.  
  1161. The problem does not show up in the "Get Info" windows of
  1162. documents on mounted floppies or CDs. I'm not sure it has
  1163. any bearing, but the internal hard disk (MicroNet, Wren,
  1164. 424Mb) is partitioned into six logical volumes, whereas the
  1165. external drive (iDS, 120 Mb) is not partitioned.
  1166.  
  1167. I haven't had the time to dive into the Tech Notes or IM to
  1168. see if there are any hints there as to what's going on; but
  1169. has anyone seen anything like this happen before? 
  1170.  
  1171. Please advise.
  1172.  
  1173.  
  1174. --
  1175. Dhanesh
  1176.  
  1177. Replies, if any, to <dks@mit.edu>, please.
  1178. --
  1179.  
  1180.  
  1181.  
  1182. - -------------------------
  1183.  
  1184. From: neeri@iis.ethz.ch (Matthias Ulrich Neeracher)
  1185. Subject:  !Weird Behavior in Finder's "Get Info" Windows
  1186. Date: 29 Jan 92 18:08:07 GMT
  1187. Organization: Integrated Systems Laboratory, ETH, Zurich
  1188.  
  1189. In article <1992Jan29.101355.2519@athena.mit.edu> dks@athena.mit.edu (Dhanesh K Samarasan) writes:
  1190. >Fellow net-nuts: 
  1191. >
  1192. >I just noticed something odd on two SCSI hard disks
  1193. >connected to a Macintosh IIci running 7.0.1*. 
  1194. >
  1195. >For each and every file and folder on both hard disks, the
  1196. >filename that is shown to the right of the icon in the "Get
  1197. >Info" window behaves like a little button. On mouseDown,
  1198. >the name is highlighted. On mouseUp, the name is
  1199. >de-highlighted and then modified as follows: 
  1200. >
  1201. >        Original                Appears as
  1202. >      ---------------------------------------
  1203. >        Utilities               !Utiliti.es
  1204. >        System Folder           !System.Fol
  1205. >        ResEdit 2.1.1           !ResEdit.21
  1206. >        HyperCard               !HyperCa.rd
  1207. >        Text                    Text
  1208. >          DD                    !DD
  1209. >        EvenBetterBusError      !EvenBet.ter
  1210. >        !Weird Problem          !!Weird.Pro
  1211. >
  1212. >A second mouseClick on the name restores it to its rightful
  1213. >value.
  1214. >
  1215. >From a cursory examination, I can't figure out the pattern
  1216. >in the appearance of these pseudo-names.
  1217.  
  1218. Actually, it's quite easy: The name shown is MS-DOS compatible: If it was
  1219. modified from the original, a ! is prepended. Then, dots are removed and one
  1220. dot is inserted after 8 characters.
  1221.  
  1222. This is probably a feature for file sharing: It shows you the name of this
  1223. object if you make it available for sharing and mount it from an MS-DOS
  1224. compatible "computer".
  1225.  
  1226. I have seen this behaviour before under 7.0, but I don't remember on what it
  1227. depends (Maybe only for shared folders ?).
  1228.  
  1229. Hope this helps
  1230.  
  1231. Matthias
  1232.  
  1233. - ---
  1234. Matthias Neeracher                                   neeri@iis.ethz.ch
  1235.  "You must have picked up that copy of Scarlett instead of Inside Mac
  1236.   when you tried to find the right call..." -- Keith Rollin
  1237.  
  1238.  
  1239.  
  1240. - -------------------------
  1241.  
  1242. From: heksterb@cs.utwente.nl (Ben Hekster)
  1243. Subject:  !Weird Behavior in Finder's "Get Info" Windows
  1244. Date: 29 Jan 92 15:08:17 GMT
  1245. Organization: University of Twente, Dept. of Computer Science
  1246.  
  1247. Hi, Dhanesh--
  1248.  
  1249. In article <1992Jan29.101355.2519@athena.mit.edu> dks@athena.mit.edu (Dhanesh K Samarasan) writes:
  1250. >For each and every file and folder on both hard disks, the
  1251. >filename that is shown to the right of the icon in the "Get
  1252. >Info" window behaves like a little button. On mouseDown,
  1253. >the name is highlighted. On mouseUp, the name is
  1254. >de-highlighted and then modified as follows: 
  1255. >
  1256. >        Original                Appears as
  1257. >      ---------------------------------------
  1258. >        Utilities               !Utiliti.es
  1259. [...]
  1260.  
  1261. I think these are the "short file names" generated by File Sharing
  1262. to support the AppleTalk Filing Protocol on file systems that
  1263. can't handle the longer and less restricted Mac file system
  1264. names, such as MS-DOS.  I.e., "Utilities" would in fact appear
  1265. as "!Utiliti.es" on such a machine, the prefixed "!" indicating
  1266. that the file name had to be shortened.
  1267.  
  1268.     Look at what happens when you have two files with long and
  1269. almost identical names in the same folder, e.g. "verylongfilenamea"
  1270. and "verylongfilenameb".  The names are abbreviated (not simply
  1271. truncated) to remain distinguishable on foreign file systems.
  1272.  
  1273. >The problem does not show up in the "Get Info" windows of
  1274. >documents on mounted floppies or CDs. I'm not sure it has
  1275. >any bearing, but the internal hard disk (MicroNet, Wren,
  1276. >424Mb) is partitioned into six logical volumes, whereas the
  1277. >external drive (iDS, 120 Mb) is not partitioned.
  1278.  
  1279. My guess would be that you won't see the short file names on
  1280. volumes that are not being shared, or at all if file sharing
  1281. is off.
  1282.  
  1283. `Hackster'
  1284. -- 
  1285. Ben `Hackster' Hekster            | sigblock(sigmask(SIGFLAME));
  1286. heksterb@cs.utwente.nl            | "Here we are now, entertain us"
  1287.  
  1288.  
  1289.  
  1290. - -------------------------
  1291.  
  1292. From: nick@dcs.ed.ac.uk (Nick Rothwell)
  1293. Subject:  !Weird Behavior in Finder's "Get Info" Windows
  1294. Date: 29 Jan 92 12:24:15 GMT
  1295. Organization: Friends of the Salter Duck
  1296.  
  1297. In article <1992Jan29.101355.2519@athena.mit.edu> dks@athena.mit.edu (Dhanesh K Samarasan) writes:
  1298.  
  1299.        Original                Appears as
  1300.      ---------------------------------------
  1301.        Utilities               !Utiliti.es
  1302.        System Folder           !System.Fol
  1303.        ResEdit 2.1.1           !ResEdit.21
  1304.        HyperCard               !HyperCa.rd
  1305.        Text                    Text
  1306.          DD                    !DD
  1307.        EvenBetterBusError      !EvenBet.ter
  1308.        !Weird Problem          !!Weird.Pro
  1309.  
  1310. Wild guess: something's translating the names into something
  1311. DOS-compatible. I think I've heard of this behaviour before, but
  1312. haven't tried it on my machine.
  1313.  
  1314.     Nick.
  1315. --
  1316. Nick Rothwell, LFCS, Edinburgh | "Chai ch t'chai ch't chnna chnna chnna ch'th
  1317.              nick@dcs.ed.ac.uk |  Chai ch t'chai ch't chuth chena chann ch'tt
  1318. Mentation Consultancy Services |  Chie ch t'chie ch t'chaaa chn chattr chattr"
  1319.    cassiel@cix.compulink.co.uk |       -- Wavestation, V3 software, my dragon.
  1320.  
  1321.  
  1322.  
  1323. - -------------------------
  1324.  
  1325. From: dks@athena.mit.edu (Dhanesh K Samarasan)
  1326. Subject:  !Weird Behavior in Finder's "Get Info" Windows
  1327. Date: 29 Jan 92 19:01:48 GMT
  1328. Organization: Massachusetts Institute of Technology
  1329.  
  1330. In article <1992Jan29.150817.8196@cs.utwente.nl> heksterb@cs.utwente.nl (Ben Hekster) writes:
  1331. [...]
  1332. >In article <1992Jan29.101355.2519@athena.mit.edu> dks@athena.mit.edu (Dhanesh K Samarasan) writes:
  1333. >>For each and every file and folder on both hard disks, the
  1334. >>filename that is shown to the right of the icon in the "Get
  1335. >>Info" window behaves like a little button. On mouseDown,
  1336. >>the name is highlighted. On mouseUp, the name is
  1337. >>de-highlighted and then modified as follows: 
  1338. >>
  1339. >>        Original                Appears as
  1340. >>      ---------------------------------------
  1341. >>        Utilities               !Utiliti.es
  1342. >[...]
  1343. >
  1344. >I think these are the "short file names" generated by File Sharing
  1345. >to support the AppleTalk Filing Protocol on file systems that
  1346. >can't handle the longer and less restricted Mac file system
  1347. >names, such as MS-DOS.  I.e., "Utilities" would in fact appear
  1348. >as "!Utiliti.es" on such a machine, the prefixed "!" indicating
  1349. >that the file name had to be shortened.
  1350.  
  1351. This part I now understand (just goes to show, you can never know
  1352. too much about DOS).  Thanks to all who have responded.
  1353.  
  1354.  
  1355. >>The problem does not show up in the "Get Info" windows of
  1356. >>documents on mounted floppies or CDs. I'm not sure it has
  1357. >>any bearing, but the internal hard disk (MicroNet, Wren,
  1358. >>424Mb) is partitioned into six logical volumes, whereas the
  1359. >>external drive (iDS, 120 Mb) is not partitioned.
  1360. >
  1361. >My guess would be that you won't see the short file names on
  1362. >volumes that are not being shared, or at all if file sharing
  1363. >is off.
  1364.  
  1365. This part I still don't understand.  If filesharing is on and
  1366. foolish things happen to names of files on hard disks, why don't
  1367. the same foolish things happen to names of files on all floppies
  1368. that are mounted at the same time?
  1369.  
  1370.  
  1371.  
  1372. --
  1373. Dhanesh
  1374.  
  1375. Replies, if any, to <dks@mit.edu>, please.
  1376. --
  1377.  
  1378.  
  1379.  
  1380. - -------------------------
  1381.  
  1382. From: wadew@ducvax.auburn.edu (Wade Williams)
  1383. Subject:  !Weird Behavior in Finder's "Get Info" Window
  1384. Date: 29 Jan 92 22:52:13 GMT
  1385. Organization: Auburn University
  1386.  
  1387. In article <1992Jan29.190148.12566@athena.mit.edu> dks@athena.mit.edu (Dhanesh
  1388. K Samarasan) writes:
  1389. >This part I still don't understand.  If filesharing is on and
  1390. >foolish things happen to names of files on hard disks, why don't
  1391. >the same foolish things happen to names of files on all floppies
  1392. >that are mounted at the same time?
  1393.  
  1394. Someone can correct me if I'm wrong, but I don't believe a floppy would be
  1395. available to FileSharing as a shared volume.
  1396.  
  1397.  
  1398. - -----------------------------------------------------------------------
  1399. Wade Williams                             "Any escape might help to smooth the 
  1400. User Services Specialist            unattractive truth, but the suburbs
  1401. Academic Computing                     have no charms to soothe the restless
  1402. Auburn University                      dreams of youth." (N. Peart)
  1403. wadew@ducvax.auburn.edu
  1404. - -----------------------------------------------------------------------
  1405.  
  1406.  
  1407.  
  1408. ---------------------------
  1409.  
  1410. From: terjer@ifi.unit.no (Terje Rydland)
  1411. Subject: SPHIGS for Mac
  1412. Date: 29 Jan 92 10:22:14 GMT
  1413. Organization: Ifi, University of Trondheim / AVH
  1414.  
  1415. I think I saw a similar question a few weeks back, but I didn't see
  1416. any replies. So I ask the question again:
  1417.  
  1418.     Does anybody know of a SPHIGS-implementation for Mac? 
  1419.  
  1420. Terje
  1421.  
  1422.  
  1423.  
  1424. - -------------------------
  1425.  
  1426. From: alana@sisters.cs.uoregon.edu (Thomas Alan Akins)
  1427. Subject:  SPHIGS for Mac
  1428. Organization: /local/lib/rn/organization
  1429. Date: Wed, 29 Jan 1992 23:48:21 GMT
  1430.  
  1431. The second to the last page of _the_ graphics text, _Computer Graphics: 
  1432. Priciples and Practice_ 2nd ed., has an order form for SRGP/SPHIGS for the
  1433. Macintosh.  Here's the order info:
  1434.  
  1435.     Macintosh version
  1436.     0-201-54701-5  $14.95
  1437.  
  1438.     Addison-Wesley Publishing Company
  1439.     Attn: Order Department
  1440.     Reading, MA 01867-9984
  1441.  
  1442.  
  1443. There is a paragraph above this info that states:
  1444.  
  1445.     "To order, photocopy and complete the form below...."
  1446.  
  1447. So, if you don't have a copy of the book, check it out somewhere and photocopy
  1448. the back page and send it in.
  1449.  
  1450. Previous replies to similar questions have posted various ftp sites as well.
  1451.                             _    _
  1452. -- 
  1453. *                                            Alan Akins                      *
  1454. *       "I could say 'addition'              alana@cs.uoregon.edu            *
  1455. *        when I mean ... 'basketball.'"      University of Oregon            *
  1456. *                        - E. Tick           Department of Computer Science  *
  1457.  
  1458.  
  1459.  
  1460. - -------------------------
  1461.  
  1462. From: sturgeod@dcs.glasgow.ac.uk (Donald Sturgeon)
  1463. Subject:  SPHIGS for Mac
  1464. Date: 30 Jan 92 13:11:39 GMT
  1465. Organization: Glasgow University Computing Science Dept.
  1466.  
  1467. There is a SPHIGS software package for the mac mentioned in:
  1468.  
  1469.     "Computer Graphics: Principles and Practice"
  1470.  
  1471.     by Foley, van Dam, Feiner and Hughes.
  1472.     Published by Addison Wesley.
  1473.  
  1474. The package is available from Addison Wesley.
  1475. They quote a price of $14.95, but you need Think C or Think Pascal to use it.
  1476.  
  1477. The book also mentions versions for Unix and PC.
  1478.  
  1479.  
  1480.  
  1481. ---------------------------
  1482.  
  1483. From: sund@tde.lth.se (Lars Sundstr|m)
  1484. Subject: Format of icm#, icm4, icm8 icon resources
  1485. Date: 29 Jan 92 13:22:53 GMT
  1486. Organization: Applied Electronics, Lund University, Lund, Sweden
  1487.  
  1488.  
  1489. According to Technical Note #306 new (and even smaller than "icsX") icons
  1490. will be  supported in the future. However, nothing is mentioned about
  1491. the format of these icons (icm#, icm4 and icm8).
  1492.  
  1493. Does anyone know anything about these formats?
  1494.  
  1495. --
  1496. Lars Sundstrom, Lund University, Department of Applied Electronics,
  1497. Box 118, S-221 00 Lund, Sweden Phone: +46-46109513 Fax:+46-46129948
  1498. Internet: sund@tde.lth.se
  1499. --
  1500.  
  1501.  
  1502.  
  1503. - -------------------------
  1504.  
  1505. From: ross@bnr.ca (Ross Brown)
  1506. Subject:  Format of icm#, icm4, icm8 icon resources
  1507. Organization: Bell-Northern Research
  1508. Date: Sat, 1 Feb 92 02:09:00 GMT
  1509.  
  1510. In article <1992Jan29.132253.15629@lth.se> sund@tde.lth.se (Lars Sundstr|m)
  1511. writes:
  1512. >
  1513. >According to Technical Note #306 new (and even smaller than "icsX") icons
  1514. >will be  supported in the future. However, nothing is mentioned about
  1515. >the format of these icons (icm#, icm4 and icm8).
  1516. >
  1517. >Does anyone know anything about these formats?
  1518.  
  1519. There are templates for these new formats in the MPW 3.2 Rez distribution. 
  1520. What I found surprising when I added 'icm#', 'icm4', and 'icm8' resources to my
  1521. application was that while they are nominally 12x12 pixels, you have to allow
  1522. for 4 blank columns at the right side in your Rez source (actually 12 rows by
  1523. 16 columns), and then when you use PlotIconID to plot them, you have to make
  1524. sure you plot into a 12x16 rectangle (or one with that aspect ratio), or your
  1525. 12x12 image comes out squished.
  1526.  
  1527. Here's an excerpt from my code for plotting an icon into a small,
  1528. variably-sized window.  Note the kludge which stretches the rectangle if the
  1529. code thinks that PlotIconID will use an 'icm?' resource.
  1530.  
  1531.     theRect = qd.thePort->portRect;
  1532.     if( theRect.right - theRect.left <= 12 && theRect.bottom - theRect.top <= 12 )
  1533.         theRect.right += ( theRect.right - theRect.left ) * ( 16 - 12 ) / 12;
  1534.     (void) PlotIconID( &theRect, align, transform, theResID );
  1535.  
  1536. Ross Brown
  1537. Bell-Northern Research Ltd.
  1538. Ottawa, Ontario, Canada
  1539. ross@bnr.ca
  1540. Opinions expressed do not necessarily represent those of BNR.
  1541.  
  1542.  
  1543.  
  1544. ---------------------------
  1545.  
  1546. From: tarr-michael@CS.YALE.EDU (Michael J. Tarr)
  1547. Subject: CacheOut
  1548. Date: 29 Jan 92 15:26:07 GMT
  1549. Organization: Department of Psychology, Yale University
  1550.  
  1551.  
  1552. The most recent MacUser describes a utility called CacheOut by HandOff
  1553. corp. that automagically turns the quadra cache on and off with
  1554. applications. It is on compuserve in ZiffNet/Mac in library 3 of
  1555. download and support forum, file CACHEO.CPT -- Could someone who has
  1556. compuserve post this?
  1557.  
  1558. Mike Tarr
  1559.  
  1560.  
  1561.  
  1562. - -------------------------
  1563.  
  1564. From: steveh@tasman.cc.utas.edu.au (Steve Howell)
  1565. Subject:  CacheOut
  1566. Date: 30 Jan 92 14:59:31 GMT
  1567. Organization: University of Tasmania, Australia.
  1568.  
  1569. >The most recent MacUser describes a utility called CacheOut by HandOff
  1570. >corp. that automagically turns the quadra cache on and off with
  1571. >applications. It is on compuserve in ZiffNet/Mac in library 3 of
  1572.  
  1573.   Or, you can use "compatibility", a program that will automatically
  1574. disable the Quadra's cache if certain (user-selectable) applications are
  1575. executed. It's archived as "quadra-auto-cache" and is available at
  1576. sumex-aim.stanford.edu in the info-mac/cp directory.
  1577.  
  1578.  
  1579.  
  1580. ---------------------------
  1581.  
  1582. From: greeny@top.cis.syr.edu (Jonathan Greenfield)
  1583. Subject: Old (strange) finder icon masks
  1584. Organization: CIS Dept., Syracuse University
  1585. Date: Wed, 29 Jan 92 11:36:47 EST
  1586.  
  1587.  
  1588. Is anybody very familiar with old icon masks?
  1589.  
  1590. I have written an application that, at one point, copies an icon family from
  1591. a desktop database into a file as a (finder) custom icon family.
  1592.  
  1593. This has worked fine, except for one example (among the ones I have tried):
  1594. StuntCopter.
  1595.  
  1596. The StuntCopter icon did not display properly, so I opened up the file
  1597. (using ResEdit) and found that the icon mask did not cover the entire icon.
  1598. To check and see if there was an error in the copying process, I opened up
  1599. StuntCopter, as well a file that used the StuntCopter icon--pasted in using
  1600. the Finder's "get Info" window.  All of the masks were identical.
  1601.  
  1602. The Finder, apparently, recognizes that the mask is strange, for the
  1603. original application file, and the manually copied (within the finder)
  1604. custom icon resource, and displays them properly (as though there were a
  1605. proper mask).  For the automatically copied file, however, the finder does
  1606. not adjust for the strange mask, and as a result, displays the icon improperly.
  1607.  
  1608. Does anybody know what's going on, or how to deal with this?
  1609.  
  1610. --
  1611. greeny                                           greeny@top.cis.syr.edu
  1612.  
  1613. "What's the difference between an orange?"
  1614.  
  1615.  
  1616.  
  1617. - -------------------------
  1618.  
  1619. From: k044477@hobbes.kzoo.edu (Jamie R. McCarthy)
  1620. Subject:  Old (strange) finder icon masks
  1621. Date: 29 Jan 92 19:35:00 GMT
  1622. Organization: Kalamazoo College
  1623.  
  1624. greeny@top.cis.syr.edu (Jonathan Greenfield) writes:
  1625. >
  1626. >I have written an application that, at one point, copies an icon family from
  1627. >a desktop database into a file as a (finder) custom icon family.
  1628. >This has worked fine, except for one example (among the ones I have tried):
  1629. >StuntCopter.
  1630. >The StuntCopter icon did not display properly, so I opened up the file
  1631. >(using ResEdit) and found that the icon mask did not cover the entire icon.
  1632. >
  1633. >Does anybody know what's going on, or how to deal with this?
  1634.  
  1635. I can guess.  Older finders (before 6?) used to XOR the mask with the
  1636. data to get the "selected" view of the icon.  Lots of old programs used
  1637. this feature to completely change their icon around--Red Ryder, for
  1638. example, would change from its ugly two Macs, phones, telephone wires,
  1639. disks, and Lord knows what else, to a cool silhouette of a guy on
  1640. horseback.
  1641.  
  1642. Of course, the Finder hasn't done this for many years, but the programs
  1643. (and their icons) don't know that.
  1644. -- 
  1645.  Jamie McCarthy     Internet: k044477@kzoo.edu     AppleLink: j.mccarthy
  1646.  Kzoo randomly kills all my mail;  if I don't acknowledge, try resending.    
  1647.  
  1648.  
  1649.  
  1650. - -------------------------
  1651.  
  1652. From: greeny@top.cis.syr.edu (Jonathan Greenfield)
  1653. Subject:  Old (strange) finder icon masks
  1654. Date: 29 Jan 92 22:25:52 GMT
  1655. Organization: CIS Dept., Syracuse University
  1656.  
  1657. In article <1992Jan29.193500.25902@hobbes.kzoo.edu> k044477@hobbes.kzoo.edu (Jamie R. McCarthy) writes:
  1658. >
  1659. >I can guess.  Older finders (before 6?) used to XOR the mask with the
  1660. >data to get the "selected" view of the icon.  Lots of old programs used
  1661. >this feature to completely change their icon around--Red Ryder, for
  1662. >example, would change from its ugly two Macs, phones, telephone wires,
  1663. >disks, and Lord knows what else, to a cool silhouette of a guy on
  1664. >horseback.
  1665. >
  1666. >Of course, the Finder hasn't done this for many years, but the programs
  1667. >(and their icons) don't know that.
  1668.  
  1669. This much I guessed.  The question is, why does the Finder properly handle
  1670. these icons for the original apps/manually copied custom icons, but not
  1671. for my automatically copied icons?
  1672.  
  1673. Is there some kind of flag or attribute that has to be set?
  1674.  
  1675. --
  1676. greeny                                           greeny@top.cis.syr.edu
  1677.  
  1678. "What's the difference between an orange?"
  1679.  
  1680.  
  1681.  
  1682. ---------------------------
  1683.  
  1684. End of C.S.M.P. Digest
  1685. **********************
  1686.